using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Cartography._Features
{
    /// <summary>
    /// <para>Generate Topographic Contours</para>
    /// <para>Creates and smooths contours from an input raster.</para>
    /// <para>从输入栅格创建轮廓并平滑轮廓。</para>
    /// </summary>    
    [DisplayName("Generate Topographic Contours")]
    public class GenerateTopographicContours : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateTopographicContours()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_rasters">
        /// <para>Input Rasters</para>
        /// <para>The input raster layers used to derive the contour lines.</para>
        /// <para>用于派生等值线的输入栅格图层。</para>
        /// </param>
        /// <param name="_area_of_interest">
        /// <para>Area of Interest</para>
        /// <para>A feature layer used to clip the input raster before processing. A buffer is created before clipping the raster, which results in larger output contours that extend beyond the selected AOI. The feature layer must have only one selected feature.</para>
        /// <para>用于在处理之前裁剪输入栅格的要素图层。在裁剪栅格之前会创建一个缓冲区，这将导致更大的输出等值线延伸到所选 AOI 之外。要素图层必须只有一个所选要素。</para>
        /// </param>
        /// <param name="_contour_features">
        /// <para>Target Contour Features</para>
        /// <para>An existing line feature class or feature layer. Contours will be appended to this feature class.</para>
        /// <para>现有线要素类或要素图层。等值线将追加到此要素类。</para>
        /// </param>
        /// <param name="_elevation_field">
        /// <para>Contour Elevation Field</para>
        /// <para>The field from the input contours that will store the contour elevation value. This field defaults to ZV2 or ZVH if a field with either of those names exists in the contour feature class.</para>
        /// <para>输入等值线中将存储等值线高程值的字段。如果等值线要素类中存在具有任一名称的字段，则此字段默认为 ZV2 或 ZVH。</para>
        /// </param>
        public GenerateTopographicContours(List<object> _in_rasters, object _area_of_interest, object _contour_features, object _elevation_field)
        {
            this._in_rasters = _in_rasters;
            this._area_of_interest = _area_of_interest;
            this._contour_features = _contour_features;
            this._elevation_field = _elevation_field;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Generate Topographic Contours";

        public override string CallName => "topographic.GenerateTopographicContours";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_rasters, _area_of_interest, _contour_features, _elevation_field, _contour_subtype, _scale.GetGPValue(), _resample_raster.GetGPValue(), _contour_interval, _base_contour, _z_factor, _zero_contour.GetGPValue(), _code_field, _index_interval, _index_code, _intermediate_code, _depression_code, _depression_intermediate_code, _raster_smooth_tolerance, _minimum_length, _contour_smooth_tolerance, _updated_contour_features];

        /// <summary>
        /// <para>Input Rasters</para>
        /// <para>The input raster layers used to derive the contour lines.</para>
        /// <para>用于派生等值线的输入栅格图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Rasters")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_rasters { get; set; }


        /// <summary>
        /// <para>Area of Interest</para>
        /// <para>A feature layer used to clip the input raster before processing. A buffer is created before clipping the raster, which results in larger output contours that extend beyond the selected AOI. The feature layer must have only one selected feature.</para>
        /// <para>用于在处理之前裁剪输入栅格的要素图层。在裁剪栅格之前会创建一个缓冲区，这将导致更大的输出等值线延伸到所选 AOI 之外。要素图层必须只有一个所选要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area of Interest")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _area_of_interest { get; set; }


        /// <summary>
        /// <para>Target Contour Features</para>
        /// <para>An existing line feature class or feature layer. Contours will be appended to this feature class.</para>
        /// <para>现有线要素类或要素图层。等值线将追加到此要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Contour Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _contour_features { get; set; }


        /// <summary>
        /// <para>Contour Elevation Field</para>
        /// <para>The field from the input contours that will store the contour elevation value. This field defaults to ZV2 or ZVH if a field with either of those names exists in the contour feature class.</para>
        /// <para>输入等值线中将存储等值线高程值的字段。如果等值线要素类中存在具有任一名称的字段，则此字段默认为 ZV2 或 ZVH。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour Elevation Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _elevation_field { get; set; }


        /// <summary>
        /// <para>Contour Subtype</para>
        /// <para>The subtype to which contours will be written if the input contours have subtypes.</para>
        /// <para>如果输入等值线具有子类型，则等值线将写入到的子类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour Subtype")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _contour_subtype { get; set; } = null;


        /// <summary>
        /// <para>Map Scale</para>
        /// <para><xdoc>
        ///   <para>Specifies the scale that will be used to optimize contours (the scale of the cartographic product that will be printed). Choosing the scale will set the defaults of other parameters to values that are appropriate for the output scale. The default value is the 1:50,000 cartographic product scale.</para>
        ///   <bulletList>
        ///     <bullet_item>1:5,000—The 1:5,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:10,000—The 1:10,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:12,500—The 1:12,500 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:25,000—The 1:25,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:50,000—The 1:50,000 cartographic product scale will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>1:100,000—The 1:100,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:250,000—The 1:250,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:500,000—The 1:500,000 cartographic product scale will be used.</bullet_item><para/>
        ///     <bullet_item>1:1,000,000—The 1:1,000,000 cartographic product scale will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于优化轮廓的比例（将要打印的制图产品的比例）。选择刻度会将其他参数的默认值设置为适合输出刻度的值。默认值为 1：50,000 制图产品比例。</para>
        ///   <bulletList>
        ///     <bullet_item>1：5,000—将使用 1：5,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：10,000—将使用 1：10,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：12,500—将使用 1：12,500 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：25,000—将使用 1：25,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：50,000—将使用 1：50,000 制图产品比例。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>1：100,000—将使用 1：100,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：250,000—将使用 1：250,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：500,000—将使用 1：500,000 制图产品比例。</bullet_item><para/>
        ///     <bullet_item>1：1,000,000—将使用 1：1,000,000 制图产品比例。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Scale")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _scale_value? _scale { get; set; } = null;

        public enum _scale_value
        {
            /// <summary>
            /// <para> </para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description(" ")]
            [GPEnumValue(" ")]
            __,

            /// <summary>
            /// <para>1:5,000</para>
            /// <para>1:5,000—The 1:5,000 cartographic product scale will be used.</para>
            /// <para>1：5,000—将使用 1：5,000 制图产品比例。</para>
            /// </summary>
            [Description("1:5,000")]
            [GPEnumValue("1:5,000")]
            value1,

            /// <summary>
            /// <para>1:10,000</para>
            /// <para>1:10,000—The 1:10,000 cartographic product scale will be used.</para>
            /// <para>1：10,000—将使用 1：10,000 制图产品比例。</para>
            /// </summary>
            [Description("1:10,000")]
            [GPEnumValue("1:10,000")]
            value2,

            /// <summary>
            /// <para>1:12,500</para>
            /// <para>1:12,500—The 1:12,500 cartographic product scale will be used.</para>
            /// <para>1：12,500—将使用 1：12,500 制图产品比例。</para>
            /// </summary>
            [Description("1:12,500")]
            [GPEnumValue("1:12,500")]
            value3,

            /// <summary>
            /// <para>1:25,000</para>
            /// <para>1:25,000—The 1:25,000 cartographic product scale will be used.</para>
            /// <para>1：25,000—将使用 1：25,000 制图产品比例。</para>
            /// </summary>
            [Description("1:25,000")]
            [GPEnumValue("1:25,000")]
            value4,

            /// <summary>
            /// <para>1:50,000</para>
            /// <para>1:50,000—The 1:50,000 cartographic product scale will be used. This is the default.</para>
            /// <para>1：50,000—将使用 1：50,000 制图产品比例。这是默认设置。</para>
            /// </summary>
            [Description("1:50,000")]
            [GPEnumValue("1:50,000")]
            value5,

            /// <summary>
            /// <para>1:100,000</para>
            /// <para>1:100,000—The 1:100,000 cartographic product scale will be used.</para>
            /// <para>1：100,000—将使用 1：100,000 制图产品比例。</para>
            /// </summary>
            [Description("1:100,000")]
            [GPEnumValue("1:100,000")]
            value6,

            /// <summary>
            /// <para>1:250,000</para>
            /// <para>1:250,000—The 1:250,000 cartographic product scale will be used.</para>
            /// <para>1：250,000—将使用 1：250,000 制图产品比例。</para>
            /// </summary>
            [Description("1:250,000")]
            [GPEnumValue("1:250,000")]
            value7,

            /// <summary>
            /// <para>1:500,000</para>
            /// <para>1:500,000—The 1:500,000 cartographic product scale will be used.</para>
            /// <para>1：500,000—将使用 1：500,000 制图产品比例。</para>
            /// </summary>
            [Description("1:500,000")]
            [GPEnumValue("1:500,000")]
            value8,

            /// <summary>
            /// <para>1:1,000,000</para>
            /// <para>1:1,000,000—The 1:1,000,000 cartographic product scale will be used.</para>
            /// <para>1：1,000,000—将使用 1：1,000,000 制图产品比例。</para>
            /// </summary>
            [Description("1:1,000,000")]
            [GPEnumValue("1:1,000,000")]
            value9,

        }

        /// <summary>
        /// <para>Resample Raster</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input raster will be resampled before creating contours.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The input raster will be resampled before creating contours. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The input raster will not be resampled when creating contours.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在创建等值线之前是否对输入栅格进行重采样。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 在创建等值线之前，将对输入栅格进行重采样。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 创建等值线时不会对输入栅格进行重采样。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resample Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _resample_raster_value _resample_raster { get; set; } = _resample_raster_value._true;

        public enum _resample_raster_value
        {
            /// <summary>
            /// <para>RESAMPLE_RASTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RESAMPLE_RASTER")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_RESAMPLE_RASTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_RESAMPLE_RASTER")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Contour Interval</para>
        /// <para>The interval, or distance, between contour lines. This can be any positive number. The default is set by the scale value. If this parameter is left blank, the default scale value will be used.</para>
        /// <para>等值线之间的间隔或距离。这可以是任何正数。默认值由比例值设置。如果此参数留空，则将使用默认比例值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _contour_interval { get; set; } = null;


        /// <summary>
        /// <para>Base Contour</para>
        /// <para>Contours are generated above and below this value to cover the entire value range of the input raster. The default is 0.</para>
        /// <para>在此值上方和下方生成等值线，以覆盖输入栅格的整个值范围。默认值为 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Base Contour")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _base_contour { get; set; } = 0;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para><xdoc>
        ///   <para>The unit conversion factor used when generating contours. The default value is 1.</para>
        ///   <para>The contour lines are generated based on the z-values in the input raster, which are often measured in units of meters or feet. With the default value of 1, the contours will be in the same units as the z-values of the input raster. To create contours in a unit other than that of the z-values, set an appropriate value for the z-factor. It is not necessary that the ground x,y and surface z-units be consistent for this tool.</para>
        ///   <para>For example, if the elevation values in your input raster are in feet, but you want the contours to be generated in meters, set the z-factor to 0.3048 (1 foot = 0.3048 meters).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>生成等值线时使用的单位转换系数。默认值为 1。</para>
        ///   <para>等值线是根据输入栅格中的 z 值生成的，z 值通常以米或英尺为单位进行测量。默认值为 1 时，等值线的单位将与输入栅格的 z 值相同。要以 z 值以外的单位创建等值线，请为 z 因子设置适当的值。对于此工具，地面 x，y 和曲面 z 单位不必一致。</para>
        ///   <para>例如，如果输入栅格中的高程值以英尺为单位，但希望以米为单位生成等值线，则将 z 因子设置为 0.3048（1 英尺 = 0.3048 米）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _z_factor { get; set; } = null;


        /// <summary>
        /// <para>Include Zero Contour</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a zero contour will be created. A zero contour represents sea level. Zero contours, when generated along a coastline, may be created inside a water body. Check this parameter if you want contours generated on land areas that are at or below sea level.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A zero contour will be created.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A zero contour will not be created. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否创建零轮廓。零等值线表示海平面。当沿着海岸线生成零等值线时，可能会在水体内部创建。如果要在海平面或海平面以下的陆地区域生成等值线，请选中此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将创建零等值线。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会创建零等值线。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Zero Contour")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _zero_contour_value _zero_contour { get; set; } = _zero_contour_value._false;

        public enum _zero_contour_value
        {
            /// <summary>
            /// <para>ZERO_CONTOUR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ZERO_CONTOUR")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ZERO_CONTOUR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ZERO_CONTOUR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Contour Code Field</para>
        /// <para>The field from the input contour feature class where the appropriate code will be stored. The field defaults to the HQC field if it exists in the input contour feature class.</para>
        /// <para>输入等值线要素类中的字段，其中将存储相应的代码。如果输入等值线要素类中存在 HQC 字段，则该字段默认为 HQC 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour Code Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _code_field { get; set; } = null;


        /// <summary>
        /// <para>Contour Index Interval</para>
        /// <para>The interval, or distance, between index contour lines. For example, if the contour interval is 20 meters and you want index contours every 100 meters, specify 100. The default is set by the scale value.</para>
        /// <para>索引等值线之间的间隔或距离。例如，如果等值线间隔为 20 米，并且您希望每 100 米设置一次索引等值线，请指定 100。默认值由比例值设置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Contour Index Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _index_interval { get; set; } = null;


        /// <summary>
        /// <para>Index Code</para>
        /// <para>The code value to be stored in the Contour Code Field (code_field in Python) when an index contour is identified. The default code will be 1 if the HQC field exists in the input contour feature class.</para>
        /// <para>标识索引轮廓时要存储在轮廓代码字段（在 Python 中为 code_field）中的代码值。如果输入等值线要素类中存在 HQC 字段，则默认代码将为 1。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Index Code")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _index_code { get; set; } = null;


        /// <summary>
        /// <para>Intermediate Code</para>
        /// <para>The code value to be stored in the Contour Code Field (code_field in Python) when an intermediate contour is identified. The default code will be 2 if the HQC field exists in the input contour feature class.</para>
        /// <para>标识中间轮廓时要存储在轮廓代码字段（在 Python 中为 code_field）中的代码值。如果输入等值线要素类中存在 HQC 字段，则默认代码将为 2。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Intermediate Code")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _intermediate_code { get; set; } = null;


        /// <summary>
        /// <para>Depression Code</para>
        /// <para>The code value to be stored in the Contour Code Field (code_field in Python) when a depression contour is identified. The default code will be 5 if the HQC field exists in the input contour feature class.</para>
        /// <para>识别凹陷轮廓时要存储在轮廓代码字段（在 Python 中为 code_field）中的代码值。如果输入等值线要素类中存在 HQC 字段，则默认代码将为 5。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Depression Code")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _depression_code { get; set; } = null;


        /// <summary>
        /// <para>Depression Intermediate Code</para>
        /// <para>The code value to be stored in the Contour Code Field (code_field in Python) when a depression intermediate contour is identified. The default code will be 61 if the HQC field exists in the input contour feature class.</para>
        /// <para>识别凹陷中间轮廓时要存储在等值线代码字段（在 Python 中为 code_field）中的代码值。如果输入等值线要素类中存在 HQC 字段，则默认代码将为 61。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Depression Intermediate Code")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _depression_intermediate_code { get; set; } = null;


        /// <summary>
        /// <para>Raster Smooth Tolerance</para>
        /// <para>The amount of smoothing to apply to the input raster before creating the contour lines.</para>
        /// <para>在创建等值线之前应用于输入栅格的平滑量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Raster Smooth Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _raster_smooth_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Contour Minimum Length</para>
        /// <para>The minimum length for an individual contour line. The default value is set by the scale value. If the value is set to 0 or left blank, no contours will be removed from the output contours based on their short length.</para>
        /// <para>单个等值线的最小长度。默认值由比例值设置。如果该值设置为 0 或留空，则不会根据其短长度从输出等值线中删除任何等值线。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers | DecimalDegrees | Decimeters </para>
        /// </summary>
        [DisplayName("Contour Minimum Length")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _minimum_length { get; set; } = null;


        /// <summary>
        /// <para>Contour Smooth Tolerance</para>
        /// <para>The amount of smoothing to apply to the contour lines. The larger the value, the more generalized the contours. The default value is set by the scale value. If this parameter is set to 0 or left blank, no smoothing will be applied to the output contours.</para>
        /// <para>应用于等值线的平滑量。该值越大，等值线越广义。默认值由比例值设置。如果此参数设置为 0 或留空，则不会对输出轮廓应用平滑处理。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers | DecimalDegrees | Decimeters </para>
        /// </summary>
        [DisplayName("Contour Smooth Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _contour_smooth_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Updated Contour Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Contour Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_contour_features { get; set; }


        public GenerateTopographicContours SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}